﻿@{
    ElementAttribute EleAttr = ViewBag.EleAttr as ElementAttribute;
    EleAttr.Name = String.IsNullOrEmpty(EleAttr.Name) ? "MenuName" : EleAttr.Name;
}
@model IList<YiYiTong.Rocket.Entity.MenuInfo>
<select name="@EleAttr.Name" class="@EleAttr.Class">
    <option value="0">顶级菜单</option>
    @if (Model != null)
    {
        foreach (var m in Model)
        {
            if (m.menuId == ViewBag.ParentID)
            {
                <option value="@m.menuId" selected="selected">@m.menuName</option>
            }
            else
            {
                <option value="@m.menuId">@m.menuName</option>
            }
        }
    }
</select>
